******************************************************** * Message Of The Day Mover v1.0 by Lawrence Goetz * ******************************************************** MOTDM is Freeware! Individuals may freely pass this onto their friends and are encouraged to upload it to bulletin boards or ftp sites, provided all the files are included and unmodified. If you wish to include this in a cd collection or any other collection of freeware or shareware, please contact me for permission via e-mail at: goetz@dorsai.org ------------------------------------------------------------------------------- Description: MOTDM will go though a list of messages and copy the current "message of the day" to a location you specify. You can use this on networks or anywhere you need to cycle though on a timely basis for various messages. It can either rotate on a daily basis, or each time you run it, depending on the command line argument you pass to it. Works in Windows 95 or DOS. Supports long file names. ------------------------------------------------------------------------------- Here is how you use MOTDM: motdm location destination max OR motdm location destination max r r means rotate no matter what the current date is. Without the r it will only change the message once a each day it is ran. Place this line in your autoexec.bat file or in another batch file that you call on a daily or timely basis. For example: motdm c:\motd\messages c:\motd 25 This will copy the current message of the day from c:\motd\messages to c:\motd, and there are 25 messages in total in the messages directory. Note that the path should not end with a \ . So if the files are in c:\motd\messages, don't write c:\motd\messages\ otherwise things will go wrong, since the program adds a \ to the end of the directories given. Same goes for the destination directory. Also note that if you wish to send it to the root dir, like c:\, leave off the \ as well and write c: . The messages in the directory of messages need to be named in the following fashion. mesx.txt - where x in mesx is the number of the message. So if you have 3 messages, they would be numbered. mes1.txt mes2.txt mes3.txt ------------------------------------------------------------------------------- In DOS you can have up to 99,999 messages, due to the 8 letters of the file name in DOS. In Windows 95 you can have over 4 billion messages because I used unsigned long int for the messaging number. In either case it should provide more than an adequate amount of messages. The message of the day is copied to the directory you specified in the command line argument and is named motd.txt. It will create an motdm.ini in the directory of the message files. The first line of the file contains the number of the last message read. If you want to start at another value for some reason you can edit the file and write the number of the LAST file read, since it increments this number before copying. The other two lines are the day and month that it last rotated a file. If the last message was mes10.txt and for some reason you want to skip to mes25.txt you can edit the ini file to have 24 as it's value. This is because the program increments before copying. The incrementing is done each time you run the motdm program. Placing 0 in the ini file will reset the counter. If the ini value becomes the max file or higher, then it is set to 0. The motdm.ini file is stored in the directory that the messages are in. This way you can use motdm to handle different message listings. ------------------------------------------------------------------------------- After the message has been rotated you can use your favorite text file displayer to display the message or the following commands in a batch file on a DOS or Windows 95 system: type motd.txt pause ------------------------------------------------------------------------------- Various uses: Rotation of inspirational messages. Rotation of computer tips. Rotation of jokes. Daily events. Even rotate WAV, JPG, HTML, or any kind of files. * The uses are endless. * You can use MOTDM to rotate any files on a daily basis: Rename your input files using the mesx.txt convention as if they are messages. Then you can rename the output file motd.txt to the file type name you want. ------------------------------------------------------------------------------- If you have a question or comment about MOTDM please e-mail me at: goetz@dorsai.org Enjoy! I hope you find this program to be of some use to you. If you find it useful, please send me e-mail at: goetz@dorsai.org Visit my web page at: http://pages.prodigy.com/goetz -------------------------------------------------------------------------------